3.4 \(\int \cosh (a+b x^2) \, dx\)

Optimal. Leaf size=53 \[ \frac{\sqrt{\pi } e^{-a} \text{Erf}\left (\sqrt{b} x\right )}{4 \sqrt{b}}+\frac{\sqrt{\pi } e^a \text{Erfi}\left (\sqrt{b} x\right )}{4 \sqrt{b}} \]

[Out]

(Sqrt[Pi]*Erf[Sqrt[b]*x])/(4*Sqrt[b]*E^a) + (E^a*Sqrt[Pi]*Erfi[Sqrt[b]*x])/(4*Sqrt[b])

________________________________________________________________________________________

Rubi [A]  time = 0.0199063, antiderivative size = 53, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 8, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.375, Rules used = {5299, 2204, 2205} \[ \frac{\sqrt{\pi } e^{-a} \text{Erf}\left (\sqrt{b} x\right )}{4 \sqrt{b}}+\frac{\sqrt{\pi } e^a \text{Erfi}\left (\sqrt{b} x\right )}{4 \sqrt{b}} \]

Antiderivative was successfully verified.

[In]

Int[Cosh[a + b*x^2],x]

[Out]

(Sqrt[Pi]*Erf[Sqrt[b]*x])/(4*Sqrt[b]*E^a) + (E^a*Sqrt[Pi]*Erfi[Sqrt[b]*x])/(4*Sqrt[b])

Rule 5299

Int[Cosh[(c_.) + (d_.)*(x_)^(n_)], x_Symbol] :> Dist[1/2, Int[E^(c + d*x^n), x], x] + Dist[1/2, Int[E^(-c - d*
x^n), x], x] /; FreeQ[{c, d}, x] && IGtQ[n, 1]

Rule 2204

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^2), x_Symbol] :> Simp[(F^a*Sqrt[Pi]*Erfi[(c + d*x)*Rt[b*Log[F], 2
]])/(2*d*Rt[b*Log[F], 2]), x] /; FreeQ[{F, a, b, c, d}, x] && PosQ[b]

Rule 2205

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^2), x_Symbol] :> Simp[(F^a*Sqrt[Pi]*Erf[(c + d*x)*Rt[-(b*Log[F]),
 2]])/(2*d*Rt[-(b*Log[F]), 2]), x] /; FreeQ[{F, a, b, c, d}, x] && NegQ[b]

Rubi steps

\begin{align*} \int \cosh \left (a+b x^2\right ) \, dx &=\frac{1}{2} \int e^{-a-b x^2} \, dx+\frac{1}{2} \int e^{a+b x^2} \, dx\\ &=\frac{e^{-a} \sqrt{\pi } \text{erf}\left (\sqrt{b} x\right )}{4 \sqrt{b}}+\frac{e^a \sqrt{\pi } \text{erfi}\left (\sqrt{b} x\right )}{4 \sqrt{b}}\\ \end{align*}

Mathematica [A]  time = 0.0305932, size = 45, normalized size = 0.85 \[ \frac{\sqrt{\pi } \left ((\cosh (a)-\sinh (a)) \text{Erf}\left (\sqrt{b} x\right )+(\sinh (a)+\cosh (a)) \text{Erfi}\left (\sqrt{b} x\right )\right )}{4 \sqrt{b}} \]

Antiderivative was successfully verified.

[In]

Integrate[Cosh[a + b*x^2],x]

[Out]

(Sqrt[Pi]*(Erf[Sqrt[b]*x]*(Cosh[a] - Sinh[a]) + Erfi[Sqrt[b]*x]*(Cosh[a] + Sinh[a])))/(4*Sqrt[b])

________________________________________________________________________________________

Maple [A]  time = 0.018, size = 40, normalized size = 0.8 \begin{align*}{\frac{\sqrt{\pi }{{\rm e}^{-a}}}{4}{\it Erf} \left ( x\sqrt{b} \right ){\frac{1}{\sqrt{b}}}}+{\frac{{{\rm e}^{a}}\sqrt{\pi }}{4}{\it Erf} \left ( \sqrt{-b}x \right ){\frac{1}{\sqrt{-b}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cosh(b*x^2+a),x)

[Out]

1/4*erf(x*b^(1/2))*Pi^(1/2)*exp(-a)/b^(1/2)+1/4*exp(a)*Pi^(1/2)/(-b)^(1/2)*erf((-b)^(1/2)*x)

________________________________________________________________________________________

Maxima [B]  time = 1.04418, size = 117, normalized size = 2.21 \begin{align*} -\frac{1}{4} \, b{\left (\frac{2 \, x e^{\left (b x^{2} + a\right )}}{b} + \frac{2 \, x e^{\left (-b x^{2} - a\right )}}{b} - \frac{\sqrt{\pi } \operatorname{erf}\left (\sqrt{b} x\right ) e^{\left (-a\right )}}{b^{\frac{3}{2}}} - \frac{\sqrt{\pi } \operatorname{erf}\left (\sqrt{-b} x\right ) e^{a}}{\sqrt{-b} b}\right )} + x \cosh \left (b x^{2} + a\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(b*x^2+a),x, algorithm="maxima")

[Out]

-1/4*b*(2*x*e^(b*x^2 + a)/b + 2*x*e^(-b*x^2 - a)/b - sqrt(pi)*erf(sqrt(b)*x)*e^(-a)/b^(3/2) - sqrt(pi)*erf(sqr
t(-b)*x)*e^a/(sqrt(-b)*b)) + x*cosh(b*x^2 + a)

________________________________________________________________________________________

Fricas [A]  time = 1.78378, size = 159, normalized size = 3. \begin{align*} -\frac{\sqrt{\pi } \sqrt{-b}{\left (\cosh \left (a\right ) + \sinh \left (a\right )\right )} \operatorname{erf}\left (\sqrt{-b} x\right ) - \sqrt{\pi } \sqrt{b}{\left (\cosh \left (a\right ) - \sinh \left (a\right )\right )} \operatorname{erf}\left (\sqrt{b} x\right )}{4 \, b} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(b*x^2+a),x, algorithm="fricas")

[Out]

-1/4*(sqrt(pi)*sqrt(-b)*(cosh(a) + sinh(a))*erf(sqrt(-b)*x) - sqrt(pi)*sqrt(b)*(cosh(a) - sinh(a))*erf(sqrt(b)
*x))/b

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \cosh{\left (a + b x^{2} \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(b*x**2+a),x)

[Out]

Integral(cosh(a + b*x**2), x)

________________________________________________________________________________________

Giac [A]  time = 1.24289, size = 55, normalized size = 1.04 \begin{align*} -\frac{\sqrt{\pi } \operatorname{erf}\left (-\sqrt{b} x\right ) e^{\left (-a\right )}}{4 \, \sqrt{b}} - \frac{\sqrt{\pi } \operatorname{erf}\left (-\sqrt{-b} x\right ) e^{a}}{4 \, \sqrt{-b}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(b*x^2+a),x, algorithm="giac")

[Out]

-1/4*sqrt(pi)*erf(-sqrt(b)*x)*e^(-a)/sqrt(b) - 1/4*sqrt(pi)*erf(-sqrt(-b)*x)*e^a/sqrt(-b)